package com.ruoyi.system.controller;


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 统计controller
 *
 * @author ruoyi
 * @date 2024-01-02
 */
@RestController
@RequestMapping("/sjsystem/static")
public class SjStaticController extends BaseController{

    @Autowired
    private ISjImportRecordService sjImportRecordService;
    @Autowired
    private ISjStandardService sjStandardService;
    @Autowired
    private ISjStandardProblemService sjStandardProblemService;
    @Autowired
    private ISjRandomRecordService sjRandomRecordService;

    /**
     * 获取随机记录详细信息
     */
    @GetMapping(value = "/importRecord")
    public AjaxResult importRecord()
    {
        return AjaxResult.success("成功",sjImportRecordService.countStandardImportant());
    }

    /**
     * 获取随机记录详细信息
     */
    @GetMapping(value = "/standard")
    public AjaxResult standard()
    {
        return AjaxResult.success("成功",sjStandardService.countStandard());
    }

    /**
     * 获取随机记录详细信息
     */
    @GetMapping(value = "/problem")
    public AjaxResult problem()
    {
        return AjaxResult.success("成功",sjStandardProblemService.countStandardProblem());
    }

    /**
     * 获取随机记录详细信息
     */
    @GetMapping(value = "/random")
    public AjaxResult random()
    {
        return AjaxResult.success("成功",sjRandomRecordService.countStandardRecord());
    }

}
